<?php

namespace common\models\shop;

use Yii;

/**
 * This is the model class for table "shop_user_address".
 *
 * @property integer $id
 * @property string $province
 * @property string $city
 * @property string $county
 * @property string $address
 * @property integer $default
 * @property string $tel
 * @property integer $userid
 */
class ShopUserAddress extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'shop_user_address';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'province', 'city', 'county', 'address', 'isdef', 'tel', 'userid'], 'required'],
            [['id', 'isdef', 'userid'], 'integer'],
            [['province', 'city', 'county', 'address', 'tel'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'province' => 'Province',
            'city' => 'City',
            'county' => 'County',
            'address' => 'Address',
            'isdef' => 'Default',
            'tel' => 'Tel',
            'userid' => 'Userid',
        ];
    }
}
